import React, { Component } from 'react'

export default class Child extends Component {
    state = {
        users:[
            { id: '001', name: '张三', age: 18 },
            { id: '002', name: '李四', age: 20 },
            { id: '003', name: '王五', age: 30 }
        ]
        // users:'abs'
    }
    render() {
        return (
            <div>
                <h2>我是Child组件</h2>
                {
                    this.state.users.map((use) => {
                        return <h4 key={use.id}>名字：{use.name}----年龄：{ use.age }</h4>
                    })
                }
            </div>
        )
    }
}
